﻿using CPPEI.Net;
using CPPEI.ShareScreen.Event.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ShareScreen.ServerProxy.ResponseHandler
{
    public class RDDisconnectHandler : BaseResponseHandler<Contract.RespRDDisconnectData>
    {
        protected override void OnHandle(NetPackage response, Contract.RespRDDisconnectData responseData)
        {
            if (responseData.IsTargetClient)
            {
                UIExitUploadRDModeEvent @event = new UIExitUploadRDModeEvent();
                UIEventBus.PublishAsync(@event);
            }
            else
            {
                UIRDDisconnectEvent @event = new UIRDDisconnectEvent();
                UIEventBus.PublishAsync(@event);
            }
        }
    }
}
